<?php
/**
 * @file $HeadURL: auth_user.php $
 * @author $Author: LiangJian (liangjian@haibao.com) $
 * @date $Date: 2015-4-1 下午3:13:54 $
 * @brief 
 */
namespace haibao\user\model\data;

/**
 * 用户表
 */
class AuthUser extends Base{

	const STAFF_YES = 1;
	
	const STAFF_NO = 0;
	
	const ACTIVE_YES = 1;
	
	const ACTIVE_NO = 0;
	
	const SUPERUSER_YES = 1;
	
	const SUPERUSER_NO = 0;
	
	const SOURCE_YES = 1;
	
	const SOURCE_NO = 0;
	
	const ACTIVE_MOBILE_NO = 0;
	
	const ACTIVE_MOBILE_YES = 1;
	
	public $nickname;
	
	public $username;
	
	public $password;
	
	public $password2;

	public $first_name = '';

	public $last_name = '';

	public $email;
	
	public $mobile;
	
	public $captcha;

	public $is_staff = 0;

	public $is_active = 1;

	public $is_superuser = '';

	public $last_login;

	public $date_joined;

	public $is_source = '';
	
	public $last_ip;
	
	public $sms_captcha;
	
	public function __construct(){
		parent::__construct();
		$this->stringField('nickname', 'nickname');
		$this->stringField('username', 'username', true);
		$this->stringField('first_name', 'first_name', true);
		$this->stringField('last_name', 'last_name', true);
		$this->stringField('email', 'email');
		$this->stringField('mobile', 'mobile');
		$this->stringField('password', 'password', true);
		$this->intField('is_staff', 'is_staff', true);
		$this->intField('is_active', 'is_active', true);
		$this->intField('is_superuser', 'is_superuser', true);
		$this->dateField('last_login', 'last_login', true);
		$this->dateField('date_joined', 'date_joined', true);
		$this->intField('is_source', 'is_source', true);
		$this->intField('last_ip', 'last_ip');

		$this->setTableName('auth_user');
	}
}